#!/bin/python3
#-*- coding: utf-8 -*-
# exp_26.py
# @author 刘秋
# @email lq@aqiu.info
# @description 
# @created 2020-04-16T14:47:00.189Z+08:00
# @last-modified 2020-04-16T14:51:17.014Z+08:00
#

#利用递归方法求5!。

def fact_l (num):
    if num ==1 or num ==0:
        return num
    return fact_l(num-1)*num
print(fact_l(5))


def fact(j):
    sum = 0
    if j == 0:
        sum = 1
    else:
        sum = j * fact(j - 1)
    return sum

print (fact(5))